import re

head_post = '''



'''
pattern = '^(.*?): (.*?)$'

for line in head_post.splitlines():  # \\1  \\2 是反向引用
    print(re.sub(pattern, '\'\\1\': \'\\2\',', line))
